﻿    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Colaboradores.Models.Cls_Func>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Cadastro de Funcionários
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Cadastro de Funcionários</h2>

    <%= Html.ValidationSummary() %>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>

        <fieldset>     
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Mat) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Mat) %>
                <%= Html.ValidationMessageFor(model => model.Mat) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Nom) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Nom) %>
                <%= Html.ValidationMessageFor(model => model.Nom) %>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Depto) %>
            </div>
            <div class="editor-field">
                <%= Html.DropDownList("Depto.Cod", "Departamentos") %>
                <%= Html.ValidationMessageFor(model => model.Depto) %>
            </div>
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Cargo) %>
            </div>
            <div class="editor-field">
                <%= Html.DropDownList("Cargo.Cod", "Cargos") %>
                <%= Html.ValidationMessageFor(model => model.Cargo) %>
            </div>

            <p>
                <input type="submit" value="Cadastrar" />
            </p>
        </fieldset>

    <% } %>
</asp:Content>

<asp:Content ID="ContentFooter" ContentPlaceHolderID="FooterContent" runat="server">
    <%= Html.ActionLink("Voltar para Funcionário", "Index") %>
</asp:Content>